load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "bool.go",
        "bugzilla.go",
        "doc.go",
        "git.go",
        "github.go",
        "instrumentation.go",
        "jira.go",
        "k8s_client.go",
        "kubernetes_cluster_clients.go",
        "storage.go",
        "strings.go",
    ],
    importpath = "k8s.io/test-infra/prow/flagutil",
    visibility = ["//visibility:public"],
    deps = [
        "//prow/bugzilla:go_default_library",
        "//prow/client/clientset/versioned:go_default_library",
        "//prow/client/clientset/versioned/typed/prowjobs/v1:go_default_library",
        "//prow/config/secret:go_default_library",
        "//prow/git:go_default_library",
        "//prow/git/v2:go_default_library",
        "//prow/github:go_default_library",
        "//prow/io:go_default_library",
        "//prow/jira:go_default_library",
        "//prow/kube:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/util/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_client_go//kubernetes:go_default_library",
        "@io_k8s_client_go//kubernetes/typed/core/v1:go_default_library",
        "@io_k8s_client_go//rest:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/manager:go_default_library",
        "@io_k8s_utils//pointer:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = [
        "github_test.go",
        "kubernetes_cluster_clients_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//pkg/flagutil:go_default_library",
        "//prow/github:go_default_library",
    ],
)
